package com.ks.api.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.ks.api.entity.CultivationLevel;

@Mapper
public interface CultivationLevelMapper extends BaseMapper<CultivationLevel> {
    
    List<CultivationLevel> findAll();
    
    CultivationLevel findById(@Param("id") Long id);
    
    CultivationLevel findByScore(@Param("score") Integer score);
    
    CultivationLevel findByStages(@Param("majorStage") String majorStage, 
                                 @Param("minorStage") String minorStage, 
                                 @Param("microStage") String microStage);
    
    List<CultivationLevel> findByMajorStage(@Param("majorStage") String majorStage);
    
    int insert(CultivationLevel level);
    
    int update(CultivationLevel level);
    
    int deleteById(@Param("id") Long id);
    
    int deleteAll();
} 